//  全局函数文件
//  GlobalFunctions.swift
//  MT
//
//  Created by zhang qiang on 2018/11/21.
//  Copyright © 2018年 张强. All rights reserved.
//

import UIKit
import Foundation


/// 求出自适应的宽度
///
/// - Parameter width: original width
/// - Returns: adpative width
public func AutoWidth(_ width: CGFloat) -> CGFloat{
    return width / 375.0 * ScreenWidth
}


/// 求出自适应的高度
///
/// - Parameter height: original height
/// - Returns: adpative height
public func AutoHeight(_ height: CGFloat) -> CGFloat{
    return height / 667.0 * ScreenHeight
}



/// 打印调试信息
///
/// - Parameters:
///   - message: msg
///   - file: 所属文件
///   - lineNumber: 所属行
public func Dlog<T>(_ message : T, file : String = #file, lineNumber : Int = #line) {
    
    // #if DEBUG
        
        let fileName = (file as NSString).lastPathComponent
        debugPrint("[\(fileName):line:\(lineNumber)]- \(message)")
        
    // #endif
}
